<include file="Public:_head" />
<include file="Public:left" />
<div id="neirong">
    
	  <!--<h2 class="lm_title">修改密码 </h2>-->
             <h3 class="subTitle"><img src="com_statics/images/icon10.png" alt="图片描述" />修改密码<span>经常修改密码，有助于提高账号的安全性！</span></h3>
                    
        <div id="EditPassword">
        	<form action="{:U('Setting/edit_password')}" method="post" onSubmit="return check_pwd();">
            <dl>
                <dt>旧密码：</dt>
                <dd><input name="pwd1" type="password" id="pwd1" class="text" onblur="check_password(this.id);"/></dd>
                <dt>新密码：</dt>
                <dd><input name="pwd2" id="pwd2" type="password" class="text" /></dd>
                <dt>新密码确认：</dt>
                <dd><input name="pwd3" id="pwd3" type="password" class="text" /></dd>
                <dd> <button class="btn_send"  type="submit" >修 改</button></dd>
            </dl>
        </form>
        </div>
        <!-- EditPassword结束 -->
                
            

	</div>
	<!-- neirong结束 -->


	<span class="clear"></span>
	<!-- 清除浮动 -->


</div>
<!-- container结束 -->
<script type="text/javascript">
function check_password(x){
        var y=document.getElementById(x).value
        $.post("__URL__/check_pword", { "pwd": y},
            function(data){
                if (data.status==0) {
                    alert('输入原密码错误，请重新输入！');
                    location.replace(location.href);  
                }
            }, "json");
    }
    function check_pwd(){
        var y=document.getElementById("pwd3").value;
        var w=document.getElementById("pwd2").value;
        if(y!=w){
        	alert('您两次输入的密码不一致，请重新输入！');
        	return false;
        }else{
        	return true;
        }
    }
</script>
<include file="Public:bottom" />